package com.example.book_manage_240827.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@AllArgsConstructor//全参构造
@NoArgsConstructor//无参构造
@Data
public class PageResult<T> {
    private int status;
    private String errorMessage;
    private List<T> records;
    //当前的t是bookinfo类型
    private Integer count;//所有的记录数
    private PageRequest pageRequest;//当前页的记录数据

    public PageResult(Integer count, PageRequest pageRequest, List<T> records)
    {
        this.count = count;
        this.pageRequest = pageRequest;
        this.records = records;
    }
}
